﻿using System;

using Microsoft.Coding4Fun.TweetCraft.Twitter;

namespace Microsoft.Coding4Fun.TweetCraft
{
    /// <summary>
    /// Provides data for an event raised after tweeting.
    /// </summary>
    public class TweetEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TweetEventArgs"/> class.
        /// </summary>
        /// <param name="source">The source of the tweet.</param>
        /// <param name="tweet">The tweet.</param>
        /// <param name="url">The url of the tweet.</param>
        public TweetEventArgs(TweetSource source, Tweet tweet, Uri url)
        {
            if (tweet == null)
                throw new ArgumentNullException("tweet");

            this.Source = source;
            this.Tweet = tweet;
            this.Url = url;
        }

        /// <summary>
        /// Gets or sets a value indicating the source of the tweet.
        /// </summary>
        public TweetSource Source { get; private set; }

        /// <summary>
        /// Gets the tweet.
        /// </summary>
        public Tweet Tweet { get; private set; }

        /// <summary>
        /// Gets the url where the tweet can be seen.
        /// </summary>
        public Uri Url { get; private set;}
    }
}
